-
-
Notifications
You must be signed in to change notification settings - Fork 206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add linux audio screensharing #130
Conversation
yes |
this seems to be working fine, except for one little issue: electron 26 turns the app into a white screen a few seconds after launch, as described in #125. works fine on electron 25.8.2 |
Instead of the virtmic binary you could try to use https://github.com/kakxem/node-pipewire, that may be a bit cleaner than bundling a prebuilt binary. |
these issues should now all be fixed (including the electron 26 whitescreen)
Curve is helping us turn it into a native addon instead. thanks for the idea though! |
Ah yeah that also sounds like a good idea. I tested the code on KDE Wayland btw and it works great for me, besides the thing with the screen sharing portal popping up multiple times. That is a interesting bug, because it also happens in Chrome directly (when just trying to share your screen on a random website), but funnily enough not in qtwebengine (also based on chromium). |
yeah, it's sadly still an issue even after all these fixes. The first time it requests is normal, and it calls our electron registered handler. then right before it starts streaming, it asks again, this time without triggering the electron handler
so it happens on any website, not just discord? |
Yup, on https://webrtc.github.io/samples/src/content/getusermedia/getdisplaymedia too for example. In Chrome it shows the portal, then the Chrome dialog, then the portal again, then the stream starts. In Firefox it works as expected, with it first showing the Firefox dialog, then the portal, and then starting the stream. |
what chromium version are you using? the site you linked works correctly for me on |
Version 118.0.5993.70 (Official Build) Arch Linux (64-bit) Interesting, maybe this is a recent bug. |
Hm, no, the version ain't it. If I try the version you linked I get the same behaviour. My description of what is happening may have been a bit bad. At first the chrome dialog opens, when you try to select the "Window" tab, you get the first portal, and when you press "Share" you get the second portal. |
i just installed chrome and it works fine for me on here's a recording, in case i'm misunderstanding Screencast.from.2023-10-12.00-17-14.webm |
maybe it's an issue with pipewire itself or whichever DE/WM you use?
or - considering it happens for me in electron too, maybe related to some chromium build flag? |
Pipewire is same for me, but I am using KDE
I also tried the Chrome Flatpak, same behaviour. So I suspect this is more of a KDE/Gnome difference. I'll try to attach a screen recording, but that is suprisingly difficult to create on Wayland :D |
2023-10-12.00-31-24.mp4 |
i just installed kde and can't repro webrtc.mp4 |
This pr is now very close to being done and you no longer need to build virtmic/venmic yourself i have added a few things that still need testing to the description at the top. if you are able to test any of them, please do and report your results |
it seems that applications using pipewire-alsa are not detected (or at least don't show up in the audio selection menu), see attached screenshot (tested on pipewire edit: i dm'ed curve on discord about this issue |
Currently only applications that contain certain props are shown (namely application.process.id, application.process.binary and node.name). Could you please send in the output of We might need to give the client control over which props he requires to be included (maybe an option similar to "Show all processes") |
The output is probably going to be pretty big or may contain some personal info (username, and so on) If you want to you can also DM me the output on discord: @curve.cpp |
Just tested and it works flawlessly 👍, both app and entire system audio work. :D |
works good on ubuntu |
hi @uku3lig, could you try again now and see if your issue is fixed? |
works flawlessly, thank you very much! |
Vencord claims it can't retrieve my sound sources and says to use pipewire, but I'm definitely using pipewire. Here's a pw-dump output from my system. |
probably related to using older glibc++. will be fixed once we publish our flatpak soon (and if you use that). Or you can update it manually please don't necro closed prs in the future, instead make a new issue! |
This might be a fairly niche usecase, but would it be possible to have a way to select a real audio input for screensharing? My usecase for this is streaming from a game console where my capture solution only handles video, so I just connect the console's audio output to my motherboard's line in jack. |
Venmic allows this, it would have to be utilized by vencord but that should be fairly easy |
Adds audio screenshare on linux via pipewire
Allows you to choose to share either your entire system audio (without Discord), or a specific application
TODO
Needs testing
resolves #117